package com.edu.entity;

import java.util.ArrayList;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
public class User {
    private Integer userid;          // 用户ID
    private String username;        // 用户名
    private String password;        // 密码
    private Integer sex;            // 用户性别
    private String phonenum;       // 电话号码
    private Integer status = 0;   
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")// 用户账号情况
    private Date brithday; 
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date signdate;          // 注册日期
    private Integer like = 0;           // 获赞数量
    private Double favorableRate = (double) 0;   // 好评率
    private String address;         // 地址
    private Integer fannum = 0;         // 粉丝数
    private Integer follownum = 0;      // 关注数
    private Integer buyertag = 0;       // 买家信用
    private Integer sellernum = 0;      // 卖家信用
    private String introduce;       // 用户简介
    private String headimg;         // 用户头像
    private int soldCount;
    private double replyRate;
    private int onSellGoodsNum;
    private ArrayList<String> userTags;
    
	public ArrayList<String> getUserTags() {
		return userTags;
	}
	public void setUserTags(ArrayList<String> userTags) {
		this.userTags = userTags;
	}
	public int getOnSellGoodsNum() {
		return onSellGoodsNum;
	}
	public void setOnSellGoodsNum(int onSellGoodsNum) {
		this.onSellGoodsNum = onSellGoodsNum;
	}
	public int getSoldCount() {
		return soldCount;
	}
	public void setSoldCount(int soldCount) {
		this.soldCount = soldCount;
	}
	public double getReplyRate() {
		return replyRate;
	}
	public void setReplyRate(double replyRate) {
		this.replyRate = replyRate;
	}
	public Integer getUserid() {
		return userid;
	}
	public void setUserid(Integer userid) {
		this.userid = userid;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public Integer getSex() {
		return sex;
	}
	public void setSex(Integer sex) {
		this.sex = sex;
	}
	public String getPhonenum() {
		return phonenum;
	}
	public void setPhonenum(String phonenum) {
		this.phonenum = phonenum;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public Date getBrithday() {
		if (this.brithday == null) {
	        return null;
	    }
	    // 如果是 java.sql.Date，转换为 java.util.Date
	    return this.brithday instanceof java.sql.Date 
	        ? new Date(this.brithday.getTime()) 
	        : this.brithday;
	}
	public void setBrithday(Date brithday) {
		this.brithday = brithday;
	}
	public Date getSigndate() {
		if (this.signdate == null) {
	        return null;
	    }
	    // 如果是 java.sql.Date，转换为 java.util.Date
	    return this.signdate instanceof java.sql.Date 
	        ? new Date(this.signdate.getTime()) 
	        : this.signdate;
	}
	public void setSigndate(Date signdate) {
		this.signdate = signdate;
	}
	public Integer getLike() {
		return like;
	}
	public void setLike(Integer like) {
		this.like = like;
	}
	public Double getFavorableRate() {
		return favorableRate;
	}
	public void setFavorableRate(Double favorableRate) {
		this.favorableRate = favorableRate;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public Integer getFannum() {
		return fannum;
	}
	public void setFannum(Integer fannum) {
		this.fannum = fannum;
	}
	public Integer getFollownum() {
		return follownum;
	}
	public void setFollownum(Integer follownum) {
		this.follownum = follownum;
	}
	public Integer getBuyertag() {
		return buyertag;
	}
	public void setBuyertag(Integer buyertag) {
		this.buyertag = buyertag;
	}
	public Integer getSellernum() {
		return sellernum;
	}
	public void setSellernum(Integer sellernum) {
		this.sellernum = sellernum;
	}
	public String getIntroduce() {
		return introduce;
	}
	public void setIntroduce(String introduce) {
		this.introduce = introduce;
	}
	public String getHeadimg() {
		return headimg;
	}
	public void setHeadimg(String headimg) {
		this.headimg = headimg;
	}
	public User(Integer userid, String username, String password, Integer sex, String phonenum, Integer status,
			Date brithday, Date signdate, Integer like, Double favorableRate, String address, Integer fannum,
			Integer follownum, Integer buyertag, Integer sellernum, String introduce, String headimg) {
		super();
		this.userid = userid;
		this.username = username;
		this.password = password;
		this.sex = sex;
		this.phonenum = phonenum;
		this.status = status;
		this.brithday = brithday;
		this.signdate = signdate;
		this.like = like;
		this.favorableRate = favorableRate;
		this.address = address;
		this.fannum = fannum;
		this.follownum = follownum;
		this.buyertag = buyertag;
		this.sellernum = sellernum;
		this.introduce = introduce;
		this.headimg = headimg;
	}
	public User() {
		super();
	}
	@Override
	public String toString() {
		return "User [userid=" + userid + ", username=" + username + ", password=" + password + ", sex=" + sex
				+ ", phonenum=" + phonenum + ", status=" + status + ", brithday=" + brithday + ", signdate=" + signdate
				+ ", like=" + like + ", favorableRate=" + favorableRate + ", address=" + address + ", fannum=" + fannum
				+ ", follownum=" + follownum + ", buyertag=" + buyertag + ", sellernum=" + sellernum + ", introduce="
				+ introduce + ", headimg=" + headimg + "]";
	}
	
    
}
